//-
// ==========================================================================
// Copyright (C) 1995 - 2006 Autodesk, Inc. and/or its licensors.  All 
// rights reserved.
//
// The coded instructions, statements, computer programs, and/or related 
// material (collectively the "Data") in these files contain unpublished 
// information proprietary to Autodesk, Inc. ("Autodesk") and/or its 
// licensors, which is protected by U.S. and Canadian federal copyright 
// law and by international treaties.
//
// The Data is provided for use exclusively by You. You have the right 
// to use, modify, and incorporate this Data into other products for 
// purposes authorized by the Autodesk software license agreement, 
// without fee.
//
// The copyright notices in the Software and this entire statement, 
// including the above license grant, this restriction and the 
// following disclaimer, must be included in all copies of the 
// Software, in whole or in part, and all derivative works of 
// the Software, unless such copies or derivative works are solely 
// in the form of machine-executable object code generated by a 
// source language processor.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND. 
// AUTODESK DOES NOT MAKE AND HEREBY DISCLAIMS ANY EXPRESS OR IMPLIED 
// WARRANTIES INCLUDING, BUT NOT LIMITED TO, THE WARRANTIES OF 
// NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR 
// PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE, OR 
// TRADE PRACTICE. IN NO EVENT WILL AUTODESK AND/OR ITS LICENSORS 
// BE LIABLE FOR ANY LOST REVENUES, DATA, OR PROFITS, OR SPECIAL, 
// DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES, EVEN IF AUTODESK 
// AND/OR ITS LICENSORS HAS BEEN ADVISED OF THE POSSIBILITY 
// OR PROBABILITY OF SUCH DAMAGES.
//
// ==========================================================================
//+

#ifndef _polyModifierNode
#define _polyModifierNode
// 
// File: polyModifierNode.h
//
// Dependency Graph Node: polyModifierNode
//
// Author: Lonnie Li
//
// Overview:
//
//		The polyModifierNode class is a intermediate class used by polyModifierCmd to
//		modify a polygonal object in Maya. The purpose of the polyModifierNode is to 
//		generalize a node that can receive an input mesh object, modify the mesh and
//		return the modified mesh.
//
//		polyModifierNode is an abstraction which does not need to know about the DG
//		and simply needs to know about the process outlined above. polyModifierCmd
//		manages when and how this node will be used.
//
//		Each polyModifierNode is recommended to contain an instance of a polyModifierFty
//		which will do the actual work, leaving only the node setup and attribute
//		associations to the node. The recommended structure of a polyModifierNode is
//		as follows:
//
//              _____________
//             /        ___  \
//           /         /   \   \
//        O |   Node  | Fty |   | O
//        |  \         \___/   /  |
//        |    \_____________/    |
//      inMesh                 outMesh
//
//
//		The purpose of the node is to simply define the attributes (inputs and outputs) of
//		the node and associate which attribute affects each other. This is basic node setup
//		for a DG node. Using the above structure, the node's inherited "compute()" method
//		(from MPxNode) should retrieve the inputs and pass the appropriate data down to the
//		polyModifierFty for processing.
//
//
// How to use: 
//
//		(1) Create a class derived from polyModifierNode
//		(2) Define and associate inMesh and outMesh attributes (inMesh --> affects --> outMesh)
//		(3) Add any additional attributes specific to the derived node and setup associations
//		(4) Define an instance of your specific polyModifierFty to perform the operation on the node
//		(5) Override the MPxNode::compute() method
//		(6) Inside compute():
//
//			(a) Retrieve input attributes
//			(b) Use inputs to setup your factory to operate on the given mesh
//			(c) Call the factory's inherited doIt() method
//
//

// Proxies
//
#include <maya/MPxNode.h>

class polyModifierNode : public MPxNode
{
public:
						polyModifierNode();
	virtual				~polyModifierNode(); 

public:

	// There needs to be a MObject handle declared for each attribute that
	// the node will have.  These handles are needed for getting and setting
	// the values later.
	//
	static  MObject		inMesh;
	static  MObject		outMesh;
};

#endif
